<?php
require 'alvoDAO.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
        <title>Aplica&ccedil;&atilde;o de pesquisa de Usu&aacute;rios</title>
        <link rel="stylesheet" type="text/css" href="css/estiloApi.css" />
    </head>
    <body>
        <div id="container">
            <div id="topo">

            </div>
            <div id="conteudo">
                <div id="inputs">
                    <div id="procurar" class="fundoDivs">
                        <form id="searchUser" action="main.php" method="post">
                            <label for="userName" >Procurar usu&aacute;rio:</label>
                            <input type="text" id="userName" name="userName" size="20" value="Digite aqui" />
                            <input type="submit" id="enviar" value="Procurar" />
                        </form>
                    </div>
                    <div id="enviarTweet" class="fundoDivs">
                        <form id="sendTweet" action="" method="post" onsubmit="return false">
                            <label for="tweet" >Enviar um Tweet</label>
                            <textarea id="tweet" cols="20" rows="10">N&atilde;o implementado ainda</textarea>
                            <input type="submit" id="enviar" value="Enviar Tweet" />
                            <input type="submit" id="reset" value="Apagar" />
                        </form>
                    </div>
                </div>
                <div id="results" class="fundoDivs">
                    <div>Resultados</div>
                    <div>
                        <?php
                            $alvos=alvoDAO::recuperar();
                            $i=1;
                            foreach($alvos as $alvo){
                                echo $alvo['screen_name']."<br />";
                                $i++;
                            }
//                        foreach($resultado['alvo'] as $prop => $val){
//                            if($val instanceof  stdClass){
//                                echo $prop."----".utf8_decode($val->text)."<br />";
//                            }else{
//                                echo $prop." ---- ".utf8_decode($val)."<br />";
//                            }
//                        }
                        ?>
                    </div>
                </div>
                <div class="clear"></div>
            </div>
        </div>
    </body>
</html>
